cd  "C:\Users\dougk\Box\Atkinson Projects\Vaccine Follow-Up\data"
* Change to working directory *
use "vax_misinfo_replication_data_raw.dta", clear

* Create Demos *
replace age = age+17
gen conservatism = ideology
gen dem3 = 0
replace dem3 = 1 if party3 == 2
gen gop3 = 0
replace gop3 = 1 if party3 == 1
recode pres_approval (2=0) (3=0)
gen female = 0
replace female = 1 if gender == 2
gen white = 0
replace white = 1 if race_5 == 1
gen black = 0
replace black = 1 if race_3 == 1
gen latino = 0
replace latino = 1 if race_4 == 1
gen dem5 = dem3
replace dem5 = 1 if party_lean == 1
gen gop5 = gop3
replace gop5 = 1 if party_lean == 2
label var education "Education"
label var income "Income"
label var black "Black"
label var latino "Latino"
label var dem3 "Democrat"
label var gop3 "Republican"
label var female "Female"
label var age "Age"
label var dem5 "Democrat"
label var gop5 "Republican"

* Table 1: Demos *
* Create age group variable
gen age_group = "Less than 30"
replace age_group = "30 to 44" if age >=30 & age <45
replace age_group = "45 to 59" if age >=45 & age < 60
replace age_group = "60 or greater" if age >= 60

* Age group
tab age_group

* Gender -- recoded prefer not to say as missing *
tab gender

* race *
gen asian = 0
replace asian = 1 if race_2 == 1
gen native = 0
replace native = 1 if race_1 == 1
gen other = 0
replace other = 1 if race_6 == 1
tab white
tab black
tab latino
tab asian 
tab native
tab other

* Education *
tab education

* Income *
tab income

* Party *
tab dem5
tab gop5

* Ideology *
tab ideo

* SI Table 1: Comparative Sample Demos *
sum black latino female
tab education
sum age, detail
sum gop3 dem3 
tab ideology

* Generate additional control variables *
gen vax_safety = vaccine_safety
recode vax_safety (1=4) (2=3) (3=2) (4=1)
gen no_insurance = insurance
recode no_insurance (1=0) (2=1)
gen pharma_favor = pharma
recode pharma_favor (1=5) (2=4) (4=2) (5=1)

* Misinformation Measures *

gen false1correct = false1
gen false2correct = false2
gen false3correct = false3
gen false4correct = false4
gen false5correct = false5
recode false1correct-false5correct (1=0) (2=1) (3=0)
gen falsecorrectsum = false1correct+false2correct+false3correct+false4correct+false5correct

gen false1believe = false1
gen false2believe = false2
gen false3believe = false3
gen false4believe = false4
gen false5believe = false5
recode false1believe-false5believe  (2=0) (3=0)
gen falsebelievesum = false1believe+false2believe+false3believe+false4believe+false5believe

* Qualtrics coded the first true question, true1, with different numbers to answer choices; recode to be consistent with the other two true questions *
recode true1 (0=3)
recode true1 (4=0)
gen true1correct = true1
gen true2correct = true2
gen true3correct = true3
recode true1correct-true3correct (2=0) (3=0)
gen truecorrectsum = true1correct+true2correct+true3correct

gen true1incorrect = true1
gen true2incorrect = true2
gen true3incorrect = true3
recode true1incorrect-true3incorrect (2=1) (3=0)
gen trueincorrectsum = true1incorrect+true2incorrect+true3incorrect

gen totalright = falsecorrectsum+truecorrectsum
gen totalwrong = falsebelievesum+trueincorrectsum

gen false1_r = false1
gen false2_r = false2
gen false3_r = false3
gen false4_r = false4
gen false5_r = false5
recode false1_r-false5_r (2=-1) (3=0)
gen true1_r = true1
gen true2_r = true2
gen true3_r = true3
recode true1_r-true3_r (2=1) (1=-1) (3=0)

gen misinformation = false1_r+false2_r+false3_r+false4_r+false5_r
gen misinformation_all = misinformation + true1_r+true2_r+true3_r

* Create Histograms to show distribution of misinformation uptake *
* SI Figure 2 *
hist misinformation_all, discrete percent xti(" ") xlabel(-8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8) graphregion(color(white)) fcolor(gray) lcolor(black)
* SI Figure 3 *
hist falsebelievesum, discrete percent xti(" " "# Believed") xlabel(0 1 2 3 4 5) graphregion(color(white)) fcolor(gray) lcolor(black)
* SI Figure 4 *
hist misinformation, discrete percent xti("") xlabel(-5 -4 -3 -2 -1 0 1 2 3 4 5) graphregion(color(white)) fcolor(gray) lcolor(black)

* Modeling Misinformation Uptake *

* SI Table 2
reg misinformation_all dem5 gop5 education female  age black latino
outreg2 using sitable2, word dec(2) replace
nbreg falsebelievesum dem5 gop5 education female  age black latino
outreg2 using sitable2, word dec(2) append
reg misinformation dem5 gop5 education female  age black latino
outreg2 using sitable2, word dec(2) append


* Expand data for analysis of conjoint experiment as each respondent evaluated seven hypothetical vaccine profiles *
*Rename dependent variables for reshape *
ren vax_bin_1 vax_bin1
ren vax_bin_2 vax_bin2
ren vax_bin_3 vax_bin3
ren vax_bin_4 vax_bin4
ren vax_bin_5 vax_bin5
ren vax_bin_6 vax_bin6
ren vax_bin_7 vax_bin7

ren vaxa_ord_1 vax_ord1
ren vaxa_ord_2 vax_ord2
ren vaxa_ord_3 vax_ord3
ren vax_ord_4 vax_ord4
ren vax_ord_5 vax_ord5
ren vax_ord_6 vax_ord6
ren vax_ord_7 vax_ord7


* One of the string variables did nto convert from SPSS to STATA correctly *
* Need to encode strings as numerical to fix *
encode F_1_1, gen(F_1_1num)
encode F_1_2, gen(F_1_2num)
encode F_1_3, gen(F_1_3num)
encode F_1_4, gen(F_1_4num)
encode F_1_5, gen(F_1_5num)

encode F_2_1, gen(F_2_1num)
encode F_2_2, gen(F_2_2num)
encode F_2_3, gen(F_2_3num)
encode F_2_4, gen(F_2_4num)
encode F_2_5, gen(F_2_5num)

encode F_3_1, gen(F_3_1num)
encode F_3_2, gen(F_3_2num)
encode F_3_3, gen(F_3_3num)
encode F_3_4, gen(F_3_4num)
encode F_3_5, gen(F_3_5num)

encode F_4_1, gen(F_4_1num)
encode F_4_2, gen(F_4_2num)
encode F_4_3, gen(F_4_3num)
encode F_4_4, gen(F_4_4num)
encode F_4_5, gen(F_4_5num)

encode F_5_1, gen(F_5_1num)
encode F_5_2, gen(F_5_2num)
encode F_5_3, gen(F_5_3num)
encode F_5_4, gen(F_5_4num)
encode F_5_5, gen(F_5_5num)

encode F_6_1, gen(F_6_1num)
encode F_6_2, gen(F_6_2num)
encode F_6_3, gen(F_6_3num)
encode F_6_4, gen(F_6_4num)
encode F_6_5, gen(F_6_5num)

encode F_7_1, gen(F_7_1num)
encode F_7_2, gen(F_7_2num)
encode F_7_3, gen(F_7_3num)
encode F_7_4, gen(F_7_4num)
encode F_7_5, gen(F_7_5num)

* Task 1 *

gen cost1 = ""
replace cost1 = F_1_1_1 if F_1_1num == 1
replace cost1 = F_1_1_2 if F_1_2num == 1
replace cost1 = F_1_1_3 if F_1_3num == 1
replace cost1 = F_1_1_4 if F_1_4num == 1
replace cost1 = F_1_1_5 if F_1_5num == 1

gen approval1 = ""
replace approval1 = F_1_1_1 if F_1_1num == 2
replace approval1 = F_1_1_2 if F_1_2num == 2
replace approval1 = F_1_1_3 if F_1_3num == 2
replace approval1 = F_1_1_4 if F_1_4num == 2
replace approval1 = F_1_1_5 if F_1_5num == 2

gen efficacy1 = ""
replace efficacy1 = F_1_1_1 if F_1_1num == 3
replace efficacy1 = F_1_1_2 if F_1_2num == 3
replace efficacy1 = F_1_1_3 if F_1_3num == 3
replace efficacy1 = F_1_1_4 if F_1_4num == 3
replace efficacy1 = F_1_1_5 if F_1_5num == 3

gen manufacturer1 = ""
replace manufacturer1 = F_1_1_1 if F_1_1num == 4
replace manufacturer1 = F_1_1_2 if F_1_2num == 4
replace manufacturer1 = F_1_1_3 if F_1_3num == 4
replace manufacturer1 = F_1_1_4 if F_1_4num == 4
replace manufacturer1 = F_1_1_5 if F_1_5num == 4

gen mildrisk1 = ""
replace mildrisk1 = F_1_1_1 if F_1_1num == 5
replace mildrisk1 = F_1_1_2 if F_1_2num == 5
replace mildrisk1 = F_1_1_3 if F_1_3num == 5
replace mildrisk1 = F_1_1_4 if F_1_4num == 5
replace mildrisk1 = F_1_1_5 if F_1_5num == 5

* Task 2 *

gen cost2 = ""
replace cost2 = F_2_1_1 if F_2_1num == 1
replace cost2 = F_2_1_2 if F_2_2num == 1
replace cost2 = F_2_1_3 if F_2_3num == 1
replace cost2 = F_2_1_4 if F_2_4num == 1
replace cost2 = F_2_1_5 if F_2_5num == 1

gen approval2 = ""
replace approval2 = F_2_1_1 if F_2_1num == 2
replace approval2 = F_2_1_2 if F_2_2num == 2
replace approval2 = F_2_1_3 if F_2_3num == 2
replace approval2 = F_2_1_4 if F_2_4num == 2
replace approval2 = F_2_1_5 if F_2_5num == 2

gen efficacy2 = ""
replace efficacy2 = F_2_1_1 if F_2_1num == 3
replace efficacy2 = F_2_1_2 if F_2_2num == 3
replace efficacy2 = F_2_1_3 if F_2_3num == 3
replace efficacy2 = F_2_1_4 if F_2_4num == 3
replace efficacy2 = F_2_1_5 if F_2_5num == 3

gen manufacturer2 = ""
replace manufacturer2 = F_2_1_1 if F_2_1num == 4
replace manufacturer2 = F_2_1_2 if F_2_2num == 4
replace manufacturer2 = F_2_1_3 if F_2_3num == 4
replace manufacturer2 = F_2_1_4 if F_2_4num == 4
replace manufacturer2 = F_2_1_5 if F_2_5num == 4

gen mildrisk2 = ""
replace mildrisk2 = F_2_1_1 if F_2_1num == 5
replace mildrisk2 = F_2_1_2 if F_2_2num == 5
replace mildrisk2 = F_2_1_3 if F_2_3num == 5
replace mildrisk2 = F_2_1_4 if F_2_4num == 5
replace mildrisk2 = F_2_1_5 if F_2_5num == 5

* Task 3 *

gen cost3 = ""
replace cost3 = F_3_1_1 if F_3_1num == 1
replace cost3 = F_3_1_2 if F_3_2num == 1
replace cost3 = F_3_1_3 if F_3_3num == 1
replace cost3 = F_3_1_4 if F_3_4num == 1
replace cost3 = F_3_1_5 if F_3_5num == 1

gen approval3 = ""
replace approval3 = F_3_1_1 if F_3_1num == 2
replace approval3 = F_3_1_2 if F_3_2num == 2
replace approval3 = F_3_1_3 if F_3_3num == 2
replace approval3 = F_3_1_4 if F_3_4num == 2
replace approval3 = F_3_1_5 if F_3_5num == 2

gen efficacy3 = ""
replace efficacy3 = F_3_1_1 if F_3_1num == 3
replace efficacy3 = F_3_1_2 if F_3_2num == 3
replace efficacy3 = F_3_1_3 if F_3_3num == 3
replace efficacy3 = F_3_1_4 if F_3_4num == 3
replace efficacy3 = F_3_1_5 if F_3_5num == 3

gen manufacturer3 = ""
replace manufacturer3 = F_3_1_1 if F_3_1num == 4
replace manufacturer3 = F_3_1_2 if F_3_2num == 4
replace manufacturer3 = F_3_1_3 if F_3_3num == 4
replace manufacturer3 = F_3_1_4 if F_3_4num == 4
replace manufacturer3 = F_3_1_5 if F_3_5num == 4

gen mildrisk3 = ""
replace mildrisk3 = F_3_1_1 if F_3_1num == 5
replace mildrisk3 = F_3_1_2 if F_3_2num == 5
replace mildrisk3 = F_3_1_3 if F_3_3num == 5
replace mildrisk3 = F_3_1_4 if F_3_4num == 5
replace mildrisk3 = F_3_1_5 if F_3_5num == 5

* Task 4 *

gen cost4 = ""
replace cost4 = F_4_1_1 if F_4_1num == 1
replace cost4 = F_4_1_2 if F_4_2num == 1
replace cost4 = F_4_1_3 if F_4_3num == 1
replace cost4 = F_4_1_4 if F_4_4num == 1
replace cost4 = F_4_1_5 if F_4_5num == 1

gen approval4 = ""
replace approval4 = F_4_1_1 if F_4_1num == 2
replace approval4 = F_4_1_2 if F_4_2num == 2
replace approval4 = F_4_1_3 if F_4_3num == 2
replace approval4 = F_4_1_4 if F_4_4num == 2
replace approval4 = F_4_1_5 if F_4_5num == 2

gen efficacy4 = ""
replace efficacy4 = F_4_1_1 if F_4_1num == 3
replace efficacy4 = F_4_1_2 if F_4_2num == 3
replace efficacy4 = F_4_1_3 if F_4_3num == 3
replace efficacy4 = F_4_1_4 if F_4_4num == 3
replace efficacy4 = F_4_1_5 if F_4_5num == 3

gen manufacturer4 = ""
replace manufacturer4 = F_4_1_1 if F_4_1num == 4
replace manufacturer4 = F_4_1_2 if F_4_2num == 4
replace manufacturer4 = F_4_1_3 if F_4_3num == 4
replace manufacturer4 = F_4_1_4 if F_4_4num == 4
replace manufacturer4 = F_4_1_5 if F_4_5num == 4

gen mildrisk4 = ""
replace mildrisk4 = F_4_1_1 if F_4_1num == 5
replace mildrisk4 = F_4_1_2 if F_4_2num == 5
replace mildrisk4 = F_4_1_3 if F_4_3num == 5
replace mildrisk4 = F_4_1_4 if F_4_4num == 5
replace mildrisk4 = F_4_1_5 if F_4_5num == 5

* Task 5 *

gen cost5 = ""
replace cost5 = F_5_1_1 if F_5_1num == 1
replace cost5 = F_5_1_2 if F_5_2num == 1
replace cost5 = F_5_1_3 if F_5_3num == 1
replace cost5 = F_5_1_4 if F_5_4num == 1
replace cost5 = F_5_1_5 if F_5_5num == 1

gen approval5 = ""
replace approval5 = F_5_1_1 if F_5_1num == 2
replace approval5 = F_5_1_2 if F_5_2num == 2
replace approval5 = F_5_1_3 if F_5_3num == 2
replace approval5 = F_5_1_4 if F_5_4num == 2
replace approval5 = F_5_1_5 if F_5_5num == 2

gen efficacy5 = ""
replace efficacy5 = F_5_1_1 if F_5_1num == 3
replace efficacy5 = F_5_1_2 if F_5_2num == 3
replace efficacy5 = F_5_1_3 if F_5_3num == 3
replace efficacy5 = F_5_1_4 if F_5_4num == 3
replace efficacy5 = F_5_1_5 if F_5_5num == 3

gen manufacturer5 = ""
replace manufacturer5 = F_5_1_1 if F_5_1num == 4
replace manufacturer5 = F_5_1_2 if F_5_2num == 4
replace manufacturer5 = F_5_1_3 if F_5_3num == 4
replace manufacturer5 = F_5_1_4 if F_5_4num == 4
replace manufacturer5 = F_5_1_5 if F_5_5num == 4

gen mildrisk5 = ""
replace mildrisk5 = F_5_1_1 if F_5_1num == 5
replace mildrisk5 = F_5_1_2 if F_5_2num == 5
replace mildrisk5 = F_5_1_3 if F_5_3num == 5
replace mildrisk5 = F_5_1_4 if F_5_4num == 5
replace mildrisk5 = F_5_1_5 if F_5_5num == 5

* Task 6 *

gen cost6 = ""
replace cost6 = F_6_1_1 if F_6_1num == 1
replace cost6 = F_6_1_2 if F_6_2num == 1
replace cost6 = F_6_1_3 if F_6_3num == 1
replace cost6 = F_6_1_4 if F_6_4num == 1
replace cost6 = F_6_1_5 if F_6_5num == 1

gen approval6 = ""
replace approval6 = F_6_1_1 if F_6_1num == 2
replace approval6 = F_6_1_2 if F_6_2num == 2
replace approval6 = F_6_1_3 if F_6_3num == 2
replace approval6 = F_6_1_4 if F_6_4num == 2
replace approval6 = F_6_1_5 if F_6_5num == 2

gen efficacy6 = ""
replace efficacy6 = F_6_1_1 if F_6_1num == 3
replace efficacy6 = F_6_1_2 if F_6_2num == 3
replace efficacy6 = F_6_1_3 if F_6_3num == 3
replace efficacy6 = F_6_1_4 if F_6_4num == 3
replace efficacy6 = F_6_1_5 if F_6_5num == 3

gen manufacturer6 = ""
replace manufacturer6 = F_6_1_1 if F_6_1num == 4
replace manufacturer6 = F_6_1_2 if F_6_2num == 4
replace manufacturer6 = F_6_1_3 if F_6_3num == 4
replace manufacturer6 = F_6_1_4 if F_6_4num == 4
replace manufacturer6 = F_6_1_5 if F_6_5num == 4

gen mildrisk6 = ""
replace mildrisk6 = F_6_1_1 if F_6_1num == 5
replace mildrisk6 = F_6_1_2 if F_6_2num == 5
replace mildrisk6 = F_6_1_3 if F_6_3num == 5
replace mildrisk6 = F_6_1_4 if F_6_4num == 5
replace mildrisk6 = F_6_1_5 if F_6_5num == 5

* Task 7 *

gen cost7 = ""
replace cost7 = F_7_1_1 if F_7_1num == 1
replace cost7 = F_7_1_2 if F_7_2num == 1
replace cost7 = F_7_1_3 if F_7_3num == 1
replace cost7 = F_7_1_4 if F_7_4num == 1
replace cost7 = F_7_1_5 if F_7_5num == 1

gen approval7 = ""
replace approval7 = F_7_1_1 if F_7_1num == 2
replace approval7 = F_7_1_2 if F_7_2num == 2
replace approval7 = F_7_1_3 if F_7_3num == 2
replace approval7 = F_7_1_4 if F_7_4num == 2
replace approval7 = F_7_1_5 if F_7_5num == 2

gen efficacy7 = ""
replace efficacy7 = F_7_1_1 if F_7_1num == 3
replace efficacy7 = F_7_1_2 if F_7_2num == 3
replace efficacy7 = F_7_1_3 if F_7_3num == 3
replace efficacy7 = F_7_1_4 if F_7_4num == 3
replace efficacy7 = F_7_1_5 if F_7_5num == 3

gen manufacturer7 = ""
replace manufacturer7 = F_7_1_1 if F_7_1num == 4
replace manufacturer7 = F_7_1_2 if F_7_2num == 4
replace manufacturer7 = F_7_1_3 if F_7_3num == 4
replace manufacturer7 = F_7_1_4 if F_7_4num == 4
replace manufacturer7 = F_7_1_5 if F_7_5num == 4

gen mildrisk7 = ""
replace mildrisk7 = F_7_1_1 if F_7_1num == 5
replace mildrisk7 = F_7_1_2 if F_7_2num == 5
replace mildrisk7 = F_7_1_3 if F_7_3num == 5
replace mildrisk7 = F_7_1_4 if F_7_4num == 5
replace mildrisk7 = F_7_1_5 if F_7_5num == 5

tab cost1 
tab cost2 
tab cost3 
tab cost4 
tab cost5 
tab cost6 
tab cost7 

tab approval1 
tab approval2 
tab approval3 
tab approval4 
tab approval5 
tab approval6 
tab approval7 

tab manufacturer1 
tab manufacturer2 
tab manufacturer3 
tab manufacturer4 
tab manufacturer5 
tab manufacturer6 
tab manufacturer7 

tab efficacy1 
tab efficacy2 
tab efficacy3 
tab efficacy4 
tab efficacy5 
tab efficacy6 
tab efficacy7 

tab mildrisk1 
tab mildrisk2 
tab mildrisk3 
tab mildrisk4 
tab mildrisk5 
tab mildrisk6 
tab mildrisk7 

* Now create choice and ordinal ratings for each vaccine profile per respondent *
gen vaxbin1 = .
replace vaxbin1 = 1 if vax_bin1 == 1
replace vaxbin1 = 0 if vax_bin1 !=1 

gen vaxbin2 = .
replace vaxbin2 = 1 if vax_bin2 == 1
replace vaxbin2 = 0 if vax_bin2 !=1 

gen vaxbin3 = .
replace vaxbin3 = 1 if vax_bin3 == 1
replace vaxbin3 = 0 if vax_bin3 !=1 

gen vaxbin4 = .
replace vaxbin4 = 1 if vax_bin4 == 1
replace vaxbin4 = 0 if vax_bin4 !=1 

gen vaxbin5 = .
replace vaxbin5 = 1 if vax_bin5 == 1
replace vaxbin5 = 0 if vax_bin5 !=1 

gen vaxbin6 = .
replace vaxbin6 = 1 if vax_bin6 == 1
replace vaxbin6 = 0 if vax_bin6 !=1 

gen vaxbin7 = .
replace vaxbin7 = 1 if vax_bin7 == 1
replace vaxbin7 = 0 if vax_bin7 !=1 

gen vaxord1 = vax_ord1
gen vaxord2 = vax_ord2
gen vaxord3 = vax_ord3
gen vaxord4 = vax_ord4
gen vaxord5 = vax_ord5
gen vaxord6 = vax_ord6
gen vaxord7 = vax_ord7

* Reshape file to create ten observations for each respondent -- as each respondent evaluated five pairs of hypothetical vaccines *
reshape long vaxbin vaxord cost approval mildrisk efficacy manufacturer, i(respondent) j(choice_set)

recode vaxord (1=7) (2=6) (3=5) (5=3) (6=2) (7=1)

order respondent choice_set vaxbin vaxord cost approval mildrisk efficacy manufacturer

* Create Dummies *
tab cost, gen(cost)
label var cost1 "Free"
label var cost2 "$20 Co-Pay"
label var cost3 "$100 Incentive"
label var cost4 "$10 Incentive"

tab efficacy, gen(efficacy)
label var efficacy1 "Efficacy: 50%"
label var efficacy2 "Efficacy: 70%"
label var efficacy3 "Efficacy: 90%"

tab approval, gen(fda)
label var fda1 "FDA: Approved"
label var fda2 "FDA: EUA"

tab mildrisk, gen(minorside)
label var minorside1 "Minor side effects: 1 in 10"
label var minorside2 "Minor side effects: 1 in 2"
label var minorside3 "Minor side effects: 1 in 4"
 
tab manufacturer, gen(manufacturer)
label var manufacturer1 "AstraZeneca"
label var manufacturer2 "Johnson & Johnson"
label var manufacturer3 "Moderna"
label var manufacturer4 "Pfizer"

*Encode to fix order*
encode efficacy, gen(efficacy_n)
encode manufacturer, gen(manufacturer_n)
encode approval, gen(fda_n)
encode cost, gen(cost_n)
encode mildrisk, gen(minorside_n)

recode cost_n (4=3) (3=4)
label define costs 1 "Free" 2 "$20 Co-pay" 3 "$10 Incentive" 4 "$100 Incentive"
label values cost_n costs

recode manufacturer_n (4=1) (1=2) (2=4)
label define manufacturers 1 "Pfizer" 2 "AstraZeneca"  3 "Moderna" 4 "Johnson & Johnson"
label values manufacturer_n manufacturers

label define fdaprocs 1 "Full Approval" 2 "Emergency Use Authorization"
label values fda_n fdaprocs

recode minorside_n (3=2) (2=3)
label define risks 1 "1 in 10" 2 "1 in 4" 3 "1 in 2"
label values minorside_n risks

fvset base 1 efficacy_n
fvset base 1 cost_n
fvset base 1 manufacturer_n
fvset base 1 fda_n
fvset base 1 minorside_n

* Figure 1 *
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n, cluster(respondent)
coefplot, drop(_cons) omitted baselevels xline(0) ///
headings(1.efficacy_n = "{bf:Efficacy}" ///  
1.minorside_n = "{bf:Minor Side Effects}" ///
1.fda_n = "{bf:FDA Approval}" ///
1.manufacturer_n = "{bf:Manufacturer}" ///
1.cost_n = "{bf:Cost}" , labsize(vsmall)) graphregion(color(white)) ylab(, labs(vsmall)) ///
xti(" " "Effect on Probability of Vaccination", size(small))  level(95) mlcolor(black) mcolor(black) xlabel(-.1 -.05 0 .05 .1 .15 .2 .25) saving(fig1top.gph, replace)

* Table 3 *
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n,  cluster(respondent)
outreg2 using table3, word  dec(2) replace 
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n vax_safety misinformation_all dem5 gop5 female age education flu_vaccine no_insurance  pharma_favor black latino ,  cluster(respondent)
outreg2 using table3, word  dec(2) append 

* SI Table 3 -- replicate with 7-point scale DV *
reg vaxord i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n,  cluster(respondent)
outreg2 using table3, word  dec(2) replace 
reg vaxord i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n vax_safety misinformation_all dem5 gop5 female age education flu_vaccine no_insurance  pharma_favor black latino ,  cluster(respondent)
outreg2 using table3, word  dec(2) append 

* SI Table 4 *
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n,  cluster(respondent)
outreg2 using sitable4, word  dec(2) replace 
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n vax_safety falsebelievesum dem5 gop5 female age education flu_vaccine no_insurance  pharma_favor black latino ,  cluster(respondent)
outreg2 using sitable4, word  dec(2) append 
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n vax_safety misinformation dem5 gop5 female age education flu_vaccine no_insurance  pharma_favor black latino ,  cluster(respondent)
outreg2 using sitable4, word  dec(2) append 
reg vaxbin i.efficacy_n i.minorside_n i.fda_n i.manufacturer_n i.cost_n vax_safety misinformation_all dem5 gop5 female age education flu_vaccine no_insurance  pharma_favor black latino ,  cluster(respondent)
outreg2 using sitable4, word  dec(2) append 

* Moderation Analysis *
* SI Figure 5 *
* Vaccine Safety *
reg vaxbin efficacy2 efficacy3 minorside2 minorside3  i.fda2##c.vax_safety manufacturer2 manufacturer3 manufacturer4 cost2 cost3 cost4, cluster(respondent)
margins, at(vax_safety=(1(1)4) fda2=(0(1)1)) vsquish atmeans
marginsplot, x(vax_safety)  recast(line) 
marginsplot, recast(line) recastci(rarea) graphregion(color(white)) xscale(range(1 4.25))  ytitle("Willingness to Vaccinate" " ") ti("") xlabel(1 "Not at all safe" 2 "Somewhat safe" 3 "Very safe" 4 "Extremely safe", labsize(vsmall))  xti(" " "Beliefs about General Vaccine Safety") legend(order(1 "Full approval" 2 "EUA")) 

* SI Figure 6 *
* Moderating influence of misinformation *
reg vaxbin efficacy2 efficacy3 minorside2 minorside3  i.fda2##c.misinformation_all manufacturer2 manufacturer3 manufacturer4 cost2 cost3 cost4, cluster(respondent)
margins, at(misinformation_all=(-8(1)8) fda2=(0(1)1)) vsquish atmeans
marginsplot, x(misinformation_all)  recast(line) 
marginsplot, recast(line) recastci(rarea) graphregion(color(white))  ytitle("Willingness to Vaccinate" " ") ti("") xti(" " "Misinformation Index") legend(order(1 "Full approval" 2 "EUA")) 

* SI Figure 7 *
* Moderating influence of income on co-pay treatment *
reg vaxbin efficacy2 efficacy3 minorside2 minorside3  i.fda2 i.cost2##c.income manufacturer2 manufacturer3 manufacturer4  cost3 cost4, cluster(respondent)
margins, at(income=(1(1)6) cost2=(0(1)1)) vsquish atmeans
marginsplot, x(income)  recast(line) 
marginsplot, recast(line) recastci(rarea) graphregion(color(white)) xscale(range(1 4.25))  ytitle("Willingness to Vaccinate" " ") ti("") xlabel(1 "<$20k" 2 "$20-40k" 3 "$40-60k" 4 "$60-80k" 5 "$80-$100k" 6 ">$100k", labsize(vsmall))  xti(" " "Income") legend(order(1 "Free" 2 "$20 Co-pay")) 
